<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="path" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
<base href="${path}/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>个人博客后台管理</title>
<link rel="stylesheet" href="${path}/layui/css/layui.css">
	<script src="${path}/js/global.js "></script>

</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">个人博客后台管理</div>
		<input type="hidden"  name="user_id" id="user_id" value="" >
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="http://t.cn/RCzsdCq" class="layui-nav-img"> 管理员
				</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">基本资料</a>
						</dd>
						<dd>
							<a href="">安全设置</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a href="">退出系统</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="tree">
					<li class="layui-nav-item layui-nav-itemed"><a class=""
						href="javascript:;">文章管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="admin/article_list.jsp" target="content">文章列表</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item "><a class=""href="${path}/admin/lable_list.jsp" target="content">标签管理</a>
					<li class="layui-nav-item "><a class=""href="${path}/admin/sort_list.jsp"target="content">分类管理</a>
					<li class="layui-nav-item "><a class=""href="${path}/admin/notice_list.jsp" target="content">公告管理</a>
					<li class="layui-nav-item "><a class=""href="${path}/admin/timeline_list.jsp" target="content">时间轴管理</a>
					<li class="layui-nav-item "><a class=""href="${path}/admin/friendlink_list.jsp" target="content">友情链接管理</a>
					
					</li>
					<li class="layui-nav-item"><a class=""
						href="javascript:;">用户管理</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="${path}/admin/user_list.jsp" target="content">用户列表</a>
							</dd>
						</dl>
					</li>
					
				</ul>
			</div>
		</div>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<iframe name="content" src="admin/article_list.jsp" width="100%" height="98%" frameborder="0" scrolling="auto"></iframe>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© 知之- 底部固定区域
		</div>
	</div>
	<script src="layui/layui.js"></script>
	<script>
		//JavaScript代码区域
		layui.use('element', function() {
			var element = layui.element;
			var $ = layui.$;
		
			 element.on('tab(tree)', function(data){
				    //console.log(data);
					alert(data);
				  //  console.log(data.index);
			 });
			 $(function(){
				 
					//页面进入判断是否登陆账号 写入ID
					$.post(getRootPath()+'/action/user/checkLogin',function(data){
						if(data.success)
						{
							$("#user_id").each(function(){     
								$(this).attr("value",data.data.user_id);
								
							});
							if(data.data.user_id!=1)
							{
								window.location.href='${path}/index.jsp';
							}
							
						}
							
					},'JSON');
				
			 });

		});
	</script>
</body>
</html>